

CC	= gcc
DEFINES =
CFLAGS	= -O2 -I/usr/X11R6/include/ -L/usr/X11R6/lib/ ${DEFINES}
PRGOUT	= bump
OBJECTS	= main.o    \
	  xinit.o   \
	  fractal.o \
	  sincos.o  \
	  bump.o    \
	  timer.o

all:	print-msg do-all

print-msg:
	@echo ================================================================
	@echo  Remove \"\#define __USE_X_SHAREDMEMORY__\" from \"xinit.h\" to
	@echo  compile this program without MIT X Shared Memory extension.
	@echo ================================================================

ifeq (.depend,$(wildcard .depend))
include .depend
do-all:	$(PRGOUT)
else
do-all: depend
endif

$(PRGOUT): ${OBJECTS}
	${CC} $(CFLAGS) -o $(PRGOUT) ${OBJECTS} -lXext -lX11 -lm

.c.o:
	$(CC) $(CFLAGS) -c $<

depend dep:
	@echo Resolving dependencies.
	@echo Type \"make\" another time to compile $(PRGOUT).
	@echo ----------------------------------------------------------------
	$(CC) -MM *.c > .depend

clean:
	@echo ================================================================
	@echo Erasing objects and backup files.
	@echo ----------------------------------------------------------------
	rm -f *.o $(PRGOUT) *~ *# core .depend





